package com.shelpe.services.simbasync.service.simbaproxy;

import java.util.List;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.Data;

@FeignClient(name="${simbaproxy.serviceID}", url="${simbaproxy.url}")
@RequestMapping(value = "/simba")
public interface AuthorizeProxy {
	
	@RequestMapping(method = RequestMethod.GET, value = "/taobao.simba.customers.authorized.get")
	public AuthorizeResponse getAuthorizeUserList(@RequestHeader("tenantID") long tenantID);

	@Data
	public static class AuthorizeResponse extends SimbaProxyBaseDto{
		
		@JsonProperty("simba_customers_authorized_get_response")
		private AuthorizedRes res;
	}
	
	@Data
	public static class AuthorizedRes {
		
		@JsonProperty("nicks")
		private AuthorizedNicks nicks;
	}
	
	@Data
	public static class AuthorizedNicks {
		
		@JsonProperty("string")
		private List<String> nick;
	}
}
